import {createRouter, createWebHashHistory} from "vue-router";
// 1. 引入组件
import About from "@/views/About.vue";
import Home from "@/views/Home.vue"
import Other from "@/views/Other.vue";


// 2. 配置路由 path 路由path  component 路由对应的组件
const routes = [
	{path: '/', component: Home},
	{path: '/about', component: About},
	{path: '/other', component: Other},
]

// 3. 创建实例
const router = createRouter({
	routes: routes, // routes
	history: createWebHashHistory() // history 路由模式（Hash 模式）
})

export default router